<!DOCTYPE html>
<!-- saved from url=(0034)https://www.showapi.com/auth/login -->
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <link type="text/css" rel="stylesheet" href="../css/font_2351238_ytdcrvdnz3b.css">

    <link rel="stylesheet" href="../css/chunk-vendors.c41b385c.css">

    <link rel="stylesheet" href="../css/chunk-common.cce6e03e.css">

    <link rel="stylesheet" href="../css/page.481d5dac.css">

    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>图书电商</title>
   
</head>

<body class="/auth/login tw-text-base">


    <div class="hero  is-fullheight ">
        <div class="hero-body tw-relative">
            <div class="container  tw-flex-grow-0">
                <div class="columns is-centered">
                    <div class="column is-4" style="width: 414px;">
                        <div class="box" style="padding: 32px;">
                            <h1 class="has-text-centered tw-text-333333" style="font-size: 24px;">
                                欢迎登录</h1><br>
                            <form class="tw-mb-8 form48" action="../server/login.php" method="POST">
                                <div class="field a">
                                    <!---->
                                    <div class="control has-icons-right"><input type="text" autocomplete="on"
                                            name="username" placeholder="用户名" class="input is-success">

                                    </div>
                                    <p class="help is-success"></p>
                                </div>
                                <div class="field a">
                                    <!---->
                                    <div class="control has-icons-right"><input type="password" autocomplete="on"
                                            placeholder="请输入密码" name="password" class="input is-success">

                                    </div>
                                    <p class="help is-success"></p>
                                </div>
                                <!---->
                                <div class="field">
                                    <!----><button class="button is-primary is-fullwidth" id="submit">
                                        <!----><span>登录
                                        </span>
                                        <!----></button>
                                    <!---->
                                </div>
                            </form>
                            <div class="level tw-text-xs">
                                <div class="level-left">
                                    <div class="block field" label="服务条款">
                                        <!-- <label class="b-checkbox checkbox">
                                            <input type="checkbox" true-value="true" value="ok">
                                            <span class="check is-primary"></span>
                                            <span class="control-label">
                                                下次自动登录
                                            </span>
                                        </label>
                                        <p class="has-text-danger"></p> -->
                                    </div>
                                </div>
                                <div class="level-right">
                                    <div class="level-item"><a href="./register.html"
                                            class="tw-text-666666 hover:tw-text-primary">注册</a></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- <script src="../js/cookies.js"></script>

    <script src="../js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#submit").on("click", function () {
                const username = $("input[name='username']").val();
                const password = $("input[name='password']").val();

                $.post("./server/login.php", {
                    "username": username,
                    "password": password,
                }, function (data) {
                    if (data == "登录成功") {
                        alert("登录成功");
                        setCookie(login, 1);

                        location = "../main/details.html";

                    } else {
                        alert("用户名或密码有误！");
                    }
                });
            });
        });
    </script> -->
</body>

</html>